/*
 *--------------------------------------------------------------------------
 *   File Name:	task.h
 * 
 *      Author:	Zhao Yanbai [zhaoyanbai@126.com]
 * 			Thu Dec 31 16:54:48 2009
 * 
 * Description:	none
 * 
 *--------------------------------------------------------------------------
 */

#ifndef	_TASK_H
#define	_TASK_H

#include "page.h"
#include "types.h"
#include "processor.h"

#define	TASK_SIZE (2*PAGE_SIZE)

typedef	union task
{
	struct
	{
		u32	sp0;

		pid_t	pid;
		pid_t	ppid;
		long	state;
		long	exit_code;
		long	tty;
		union task *prev,*next;
	};

	unsigned long stack[TASK_SIZE];
} Task, *pTask;

extern	pTask	current;
extern	Task	RootTsk;


#endif //_TASK_H
